package com.hanthink.system.service.repair;

import java.util.List;
import java.util.Map;

import com.hanthink.common.core.domain.model.LoginUser;
import com.hanthink.system.domain.repair.EquipSelfCheckVo;
import com.hanthink.system.domain.repair.RepairHelpUser;
import com.hanthink.system.domain.repair.RepairRecordInfo;

/**
 * @author Administrator 维修单server
 */
public interface IRepairRecordInfoService {

	int insertPairRecord(List<RepairRecordInfo> list);

	/**
	 * 查询当前待维修单据
	 * 
	 * @param params
	 * @return
	 */
    List<RepairRecordInfo> selectWaitRepairList(Map<String, Object> params);

	List<RepairRecordInfo> selectWaitRepairListbyCode(Map<String, String> params);

	List<RepairRecordInfo> selectWaitRepairListsj(Map<String, Object> params);


	/**
	 * 查询当前待审核单据
	 * 
	 * @param params
	 * @return
	 */
    List<RepairRecordInfo> selectWaitCheckList(Map<String, Object> params);

	List<RepairRecordInfo> selectWaitCheckListRole(String site,String deptid,String username);


	List<RepairRecordInfo> selectWaitCheckListRoleqx(String site,String deptid,String username);
	List<RepairRecordInfo> selectWaitCheckListRoleqx1(String site,String deptid,String username);
	List<RepairRecordInfo> selectWaitCheckListRoleqx2(String site,String deptid,String username);
	/**
	 * 根据ID更新维修单状态
	 * 
	 * @param params
	 * @return
	 */
    int updateRepairStatus(Map<String, Object> params);

	void updateRepairStatusplus(Map<String, Object> params);

	/**
	 * <p>
	 * Title: saveEquipSelfCheckInfo
	 * </p>
	 * <p>
	 * Description: 保存维修文件信息
	 * </p>
	 * 
	 * @param scv       自建信息
	 * @param loginUser
	 * @return
	 */
	boolean saveRepairFile(RepairRecordInfo scv, LoginUser loginUser);

	/**
	 * 根据ID更新维修单审核状态
	 * 
	 * @param params
	 * @return
	 */
    int updateRepairCheckStatus(Map<String, Object> params);

	/**
	 * 根据ID查询维修单
	 * 
	 * @param params
	 * @return
	 */
    RepairRecordInfo selectRecordById(Long id);

	/**
	 * 根据维修单ID查询协助人信息
	 * 
	 * @param repairHelpUser 维修协助人
	 * @return
	 */
    List<RepairHelpUser> selectHelpUser(RepairHelpUser repairHelpUser);

	/**
	 * 根据维修单ID刪除协助人信息
	 * 
	 * @param repairHelpUser 维修协助人
	 * @return
	 */
    void deleteHelpUserById(RepairHelpUser repairHelpUser);

	/**
	 * 新增协助人信息
	 * 
	 * @param repairHelpUser 维修协助人
	 * @return
	 */
    void insertHelpUser(List<RepairHelpUser> list);

	/**
	 * 根据ID更新维修单执行人
	 * 
	 * @param params
	 * @return
	 */
    void updateRepairUser(Map<String, Object> params);

	/**
	 * 根据报修单ID查询维修单信息
	 * 
	 * @param params
	 * @return
	 */
    List<RepairRecordInfo> selectRepairByRequestId(RepairRecordInfo repairRecordInfo);

	List<RepairRecordInfo> selectRepairByRequestOverTime();

	void updateRepairByRequestOverTime(Long id);
	/**
	 * 根据维修单ID查询维修协助人信息
	 * 
	 * @param params
	 * @return
	 */
    List<RepairHelpUser> selectHelpUserByRepairId(Long repairId);
}
